![]() |
PATH![]() |
![]() ![]() |
The following Dialog Manager data types are new, changed, or not recommended with Appearance Manager 1.0:
A standard alert structure of type AlertStdAlertParamRec can be used when you call the function StandardAlert to customize the alert box. The AlertStdAlertParamRec type is available with Appearance Manager 1.0 and later.
struct AlertStdAlertParamRec {
Boolean movable;
Boolean helpButton;
ModalFilterUPP filterProc;
StringPtr defaultText;
StringPtr cancelText;
StringPtr otherText;
SInt16 defaultButton;
SInt16 cancelButton;
UInt16 position;
};
typedef struct AlertStdAlertParamRec AlertStdAlertParamRec;
typedef AlertStdAlertParamRec *AlertStdAlertParamPtr;
A dialog resource is a resource of type 'DLOG' . All dialog resources can be marked purgeable, and they must have resource ID numbers greater than 127. With Appearance Manager 1.0, the 'DLOG' resource has been changed to support the dialog font table ('dftb') resource; see 'dftb' for a description of the dialog font table resource.
You can use an extended dialog resource with the same resource ID as your dialog resource to provide additional features for your dialog box, including movable modal behavior, Appearance-compliant backgrounds and controls, and embedding hierarchies. See 'dlgx' for a description of the extended dialog resource. Use the GetNewDialog function to create the dialog box defined in the dialog resource and extended dialog resource .
Figure 1-1 shows the format of a compiled dialog resource.
Figure 1-1 Structure of a compiled dialog ('DLOG') resource
The compiled version of a dialog resource contains the following elements:
Use an extended dialog ('dlgx') resource with the same resource ID as your dialog resource to provide additional features for your dialog box, including movable modal behavior, theme-compliant backgrounds and controls, and embedding hierarchies. The extended dialog resource is available with Appearance 1.0 and later.
All extended dialog resources can be marked purgeable, and they must have the same resource ID and be located in the same file as their corresponding dialog resource. Use the function GetNewDialog to create the dialog box defined in the dialog resource and extended dialog resource .
Figure 1-2 shows the format of a compiled extended dialog resource.
Figure 1-2 Structure of a compiled extended dialog ('dlgx') resource
The compiled version of an extended dialog resource contains the following elements:
You can use an extended alert ( 'alrx' ) resource with the same resource ID as your alert resource to provide additional features for your alert box, including movable modal behavior, Appearance-compliant backgrounds and controls, and embedding hierarchies. The resource also gives you the option of creating a title for movable alert boxes. The extended alert resource is available with Appearance 1.0 and later.
All extended alert resources can be marked purgeable, and they must have the same resource ID and resource file as their corresponding alert resource. Figure 1-3 shows the structure of a compiled extended alert resource.Note
Alert titles are only available with Appearance version 1.0.1 and later.
Figure 1-3 Structure of a compiled extended alert ('alrx') resource
The compiled version of an extended alert resource contains the following elements:
Your application can specify the initial font settings for all controls in a dialog box or alert box by creating a dialog font table resource of type 'dftb' with the same resource ID as the item list resource ( 'DITL' ). The control font style information in the dialog font table resource is automatically read in (along with the 'DITL' ) by the Dialog Manager. When the 'dftb' resource is read in, the control font styles are set, and the resource is marked purgeable.
When an embedding hierarchy is established in a dialog box, the dialog font table resource should be used instead of the item color table ( 'ictb' ) resource, since edit and static text dialog items become controls in an embedding hierarchy. The dialog font table resource is available with Appearance 1.0 and later.
Figure 1-4 shows the format of a compiled dialog font table resource.
Figure 1-4 Structure of a compiled dialog font table ('dftb') resource
A compiled version of a 'dftb' resource contains the following elements:
Figure 1-5 shows the format of a compiled dialog control font entry in a 'dftb' resource.
Figure 1-5 Structure of dialog control font entry in a 'dftb' resource
Each entry in a 'dftb' resource corresponds to a dialog item and contains the following elements:
0x00 | Normal | |
0x01 | Bold | |
0x02 | Italic | |
0x04 | Underline | |
0x08 | Outline | |
0x10 | Shadow | |
0x20 | Condense | |
0x40 | Extend |
The dialog color table resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and the kDialogFlagsUseThemeBackground feature bit of the extended dialog resource 'DLOG' is set, the entire dialog color table resource ('dctb') is ignored. If the Appearance Manager is available, but the above is not true, the wContent field of the 'dctb' resource is used, but all other fields are still ignored.
The alert color table resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and the kAlertFlagsUseThemeBackground feature bit of the extended alert resource is set, the entire alert color table resource ('actb') is ignored. If the Appearance Manager is available, but the kAlertFlagsUseThemeBackground bit is not set, the wContent field of the 'actb' resource is used, but all other fields are still ignored.
The item color table resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and an embedding hierarchy is established in the dialog box, any item color table ('ictb') resource information is ignored. The dialog font table ('dftb') resource should be used instead of the item color table resource to specify the font settings for all dialog items in an embedding hierarchy.
If an embedding hierarchy is not established, the item color table resource can be used to set the font information for any editable text and static text dialog items, but the dialog font table resource will still be used for any controls in the dialog box.